package com.example.springsecurity.controller;

import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 引擎模板测试类
 * @Author: xieyonghui
 * @Date: 2019/7/10
 * @Description:
 */
@Controller
public class TestController {

    @RequestMapping(value = "/index")
    public String index(Model model){
        String name = "xiaosha";
        model.addAttribute("name", name);
        return "index";
    }

    @RequestMapping("/login-error")
    public String loginError(){
        return "login-error";
    }

    @RequestMapping("/login-success")
    public String loginSuccess(){
        return "login-success";
    }

    @RequestMapping("/login")
    public String userLogin(){
        return "demo-sign";
    }

}
